#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int findMaxConsecutiveOnes(int* nums, int numsSize) {
    int i = 0;
    int count = 0;
    int max = 0;
    for (i = 0; i < numsSize; i++)
    {
        if (nums[i] == 1)
        {
            count++;
        }
        else
        {
            count = 0;
            continue;
        }
        if (count > max)
            max = count;
    }
    return max;
}

int main()
{
	int num[6] = { 1,1,0,1,1,1 };
	int len = sizeof(num) / sizeof(num[0]);
	findMaxConsecutiveOnes(num, len);

	return 0;
}